var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, o, n) {
    var r, i = arguments.length, c = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(t, e, o, n); else for (var a = t.length - 1; 0 <= a; a--) (r = t[a]) && (c = (i < 3 ? r(c) : 3 < i ? r(e, o, c) : r(e, o)) || c);
    return 3 < i && c && Object.defineProperty(e, o, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("BaseView"), s = e("Global"), c = e("TryView"), l = e("GameConfig"), d = e("GameData"), u = e("AccelerometerTigger"), p = e("MyButton"), h = e("WebManager"), f = cc._decorator, g = f.ccclass, m = f.property, y = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.viewname = "", t.root = null, t.tigger = null, t.tryView = null, t.myButton = null, 
        t;
    }
    return i(t, e), t.prototype.onLoad = function() {
        l.GC.isVaild(this.text) || (this.tigger.enabled = !0), cc.systemEvent.on(this.text, this.callback, this);
    }, t.prototype.onDestroy = function() {
        cc.systemEvent.targetOff(this);
    }, t.prototype.start = function() {
        this.myButton.init(this.text);
    }, t.prototype.onClickVideo = function() {
        var e = this;
        if (GA.Info.underCheck && l.GC.isDebug) return cc.systemEvent.emit("videoEnd", this.text), 
        void this.callback();
        this.pushEvent("视频试用"), GA.rewardOperation({
            tag: this.text,
            page: "",
            byVideo: !0,
            result: function(t) {
                t.reward && (cc.systemEvent.emit("videoEnd", e.text), cc.isValid(e) && e.callback());
            }
        });
    }, t.prototype.callback = function() {
        s.G.tryMachineIdx = 0, d.GD.tryFailCount = 0, this.tryView.closePnl();
    }, t.prototype.pushEvent = function(t) {
        h.default.getInstance().sentLog("点击" + this.viewname + "界面" + t + "按键");
    }, t.prototype.showPnl = function() {
        this.root.active = !0;
    }, t.prototype.hidePnl = function() {
        this.root.active = !1;
    }, a([ m ], t.prototype, "viewname", void 0), a([ m(cc.Node) ], t.prototype, "root", void 0), 
    a([ m(u.default) ], t.prototype, "tigger", void 0), a([ m(c.default) ], t.prototype, "tryView", void 0), 
    a([ m(p.default) ], t.prototype, "myButton", void 0), a([ g ], t);
}(r.default);

n.default = y;